import cookies from 'js-cookie'

const tokenKey = "login-key"

export function getToken() {
    return cookies.get(tokenKey)
}

export function setToken(token) {
    return cookies.set(tokenKey, token)
}

export function removeToken() {
    return cookies.remove(tokenKey)
}

//存信息 cookies

export function setCookies(key, val) {
    return cookies.set(key, val)
}

export function removeCookies(key) {
    return cookies.remove(key)
}

export function getCookies(key) {
    return cookies.get(key)
}